package com.leetcode.algorithm.y22.m06;

/**
 * 231. 2 的幂
 * 
 * https://leetcode.cn/problems/power-of-two/
 * 
 * @author jie.deng
 *
 */
class Question0231Solution01 {

	public boolean isPowerOfTwo(int n) {
		if (n <= 0)
			return false;
		return (n & (n - 1)) == 0;
	}

}